# _*_ coding: utf-8 _*_
from odoo import models, fields, api


class HrEmployee(models.Model):
    _inherit = "hr.employee"
    _rec_names_search = ['name', 'code']

    code = fields.Char()
    english_name = fields.Char()
    office = fields.Char()
    cost_center_code = fields.Char()
    cost_center_name = fields.Char()
    in_date = fields.Date()
    fkc_company_code = fields.Char()
    fkc_company_name = fields.Char()
    work_state_id = fields.Many2one('res.country.state',
                                    domain=lambda self: [('country_id', '=', self.env.ref('base.cn').id)])


class EmployeePublic(models.Model):
    _inherit = 'hr.employee.public'

    code = fields.Char(readonly=True)
    english_name = fields.Char(readonly=True)
    office = fields.Char(readonly=True)
    cost_center_code = fields.Char(readonly=True)
    cost_center_name = fields.Char(readonly=True)
    in_date = fields.Date(readonly=True)
    fkc_company_code = fields.Char(readonly=True)
    fkc_company_name = fields.Char(readonly=True)
    work_state_id = fields.Many2one('res.country.state')
